Adds missing scope checks for setting properties
Allows functions within methods to act as method