Fixed bug introduced when moving to Object.defineProperty in AssertionError.

Refactored by moving assertions into their own object initially.