Fix traceback introduced in c985e60

c985e60 from earlier today broke a lot of things, because of a
misreading of how getattr was being called. This commit fixes that.
Merge pull request #5979 from terminalmage/quickfix

Fix traceback introduced in c985e60