TestHandler formatted record cache was always invalidated

A faulty compare caused the cache to always be invalidated. I've added a test to verify that the cache is not invalidated on every call to handler.formatted_records.

On the other hand, it might be better to remove the cache completely.