Issue #18967: Implemented minor changes from @timgraham's feedback on pull request #1222.