Add support for nested functions with the same name in different contexts