Validate that @lends is on object literal

Fixes #747 .