core/parser: fix loop on broken values matching the prefix of a good value in parse_option_tag_body()

- reported by Savolainen Dmitri, FS#396

(cherry picked from commit 9ff18b15c24a933fa061663add3223b8256a88d1)