Fix breakage in option recognition

Fixes #22347.