Code to ensure query limit is satisfied despite stale entries, but commented out because of insufficient testing.