[ros-diffs] [weiden] 20795: Fix code assuming that the Reg* functions set the last error code