[ros-diffs] [cgutman] 36921: - Move the checks inside of the lock