Fix bug in Context.push_function
Refactor imports to fix bug in set_from_dotted_name.