Fix removal of history entries in release builds.

Closes #56