Fix bug where unqualified function calls received wrong this object.