Fixed autoloader issue when using with symfony framework autoloader

If we want to use symfony framework inside event anonymous function we should check autoloader for already registered functions.
This patch fixes issue