Fixed cursor iteration when first batch is 0 and cursor is constructed through constructor

This supersedes #647.