Changed the invariant to actually use the assertInvariant method.