statement caching in db:get-tests-for-run-state-status was broken.