Restore positions of cursors after inserting debug statements