diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 681dfb7a8c..8cc638d304 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -1524,9 +1524,6 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished, bool will_
 		}
 	}
 
-	/* reset loop_changing so it does not affect next transport action */
-	loop_changing = false;
-
 	if (!will_locate && !_transport_fsm->declicking_for_locate()) {
 
 		DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: locate\n"));
@@ -1548,6 +1545,9 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished, bool will_
 		}
 	}
 
+	/* reset loop_changing so it does not affect next transport action */
+	loop_changing = false;
+
 	have_looped = false;
 
 	/* don't bother with this stuff if we're disconnected from the engine,
