Fix StringScanner example (fixes #9601)