NameError in function nested in __init__ method