diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 94a1b9739e538724bad20d9eee6433db0052a421..e472dac00f431ff2cfbddeb4725e64fb35ba53f2 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -7623,7 +7623,7 @@ class LUInstanceRename(LogicalUnit):
     # Change the instance lock. This is definitely safe while we hold the BGL.
     # Otherwise the new lock would have to be added in acquired mode.
     assert self.REQ_BGL
-    assert self.glm.is_owned(locking.BGL)
+    assert locking.BGL in self.owned_locks(locking.LEVEL_CLUSTER)
     self.glm.remove(locking.LEVEL_INSTANCE, old_name)
     self.glm.add(locking.LEVEL_INSTANCE, self.op.new_name)