lib/kcore: fix loop on broken values matching the prefix of a good value in parse_supported()

- reported by Savolainen Dmitri, FS#396