Added equality assertion.

[Delivers #57443916]
Another attempt to fix valgrind stall on travis.
Yet another attempt to appease travis valgrind.
D'oh!
Revert "Another attempt to fix valgrind stall on travis."

This reverts commit e9d621a6bd01ac9f762f2f6c94b5881fbb82d05e.
Self-review