updated AST traversal logic to understand functions in large object literals

hopefully I didn't break something in the process?