Fix #1817 again so that we return the getter method name for object declaration.
Issue #1817 change test