Dynamic scope implementation for method overriding