Add test for cursor issue in #213.
Never seen this error in real world though, only by running tests, and not
always either then.