Fix recursion protection so that it works with __autoload as well