--- a/branches/refactor-mapped-buffer/rosegarden/src/sound/MappedBufMetaIterator.cpp
+++ b/branches/refactor-mapped-buffer/rosegarden/src/sound/MappedBufMetaIterator.cpp
@@ -279,10 +279,12 @@
             // lest we loop forever waiting for a valid event.
             if (!cur || !cur->isValid()) { continue; }
 
-            // Now increment it.
-            ++(*iter);
-
             if (cur->getEventTime() < endTime) {
+                // Increment the iterator, since we're taking this
+                // event.  NB, in the other branch it is not yet used
+                // so we leave `iter' where it is.
+                ++(*iter);
+                
                 // If we got this far, we'll want to try the next
                 // iteration, so note it.
                 innerLoopHasMore = true;