s_expressions-cache_tests: add checks using empty reference and cursor