Fix removal of history entries in release builds.

Closes #56
Ignore an unused variable.
Add regression test for issue #56.
Improve entry test.