Implement func_code and func_globals for lambdas and when not using py-function class
Fix creation of exception subclass using the fallback solution