Support nested objects
Fix name resolution for nested objects