Fixed a bug with the WP data cache, and a bug in tests.