fixing braces to conform with rest of codebase
changing getObjectAttribute to be proper static method
adding regression tests to ensure issue 797 stays fixed