SERVER-15343 Advance cursor only if not at EOF already

https://jira.mongodb.org/browse/SERVER-15343