[ros-diffs] [cwittich] 32084: move code to the correct position to handle all cases in 'if'