Add test that ES filterreader getCoreCacheKey() behaves correctly.

Closes #8831.