Issue #2291449 by Cottser: Add Twig template inheritance based on the theme registry, enable adding Twig loaders