Fix for bug where indexing will not fill the cache completely.
Beefing up the test to ensure the result cache is filled properly.