dedicated scope isolation function for autoload_real

Should fix https://github.com/composer/composer/issues/2672