RUBY-505 test on intervening query during cursor iteration