Make the 'name' attribute available in object definitions

fixes #7538