We may already have a loaded AppKernel, if so register it with the legacy Pimple DIContainer so it doesn't start with a fresh kernel which causes problems when it tries to load in the compiled classes (which are already loaded)
Fixes PHP fatal error: PHP Fatal error:  require_once(): Cannot redeclare class symfony\component\templating\templatereferenceinterface