[1.7.x] Fixed #22546 -- Removed idioms in tutorial 2.

Thanks bjb at sourcerer.ca for the suggestion.

Backport of 927245ccd8 from master