Thinking about this further.

I can't think of a scenario when you've explicitly closed the cursor and would not want to cache the data; even if the end of the statement hasn't been reached? So I'm wondering if the atEndOfStatement check is needed at all? 

There's probably a scenario I haven't thought of / come across where this would be the case?