Fix crash when auto-detecting anonymous function.