Fix issue with object in the destructuring initializer

Fixes #1011