Document scan iterator fixes, test improvements.