Use lastIndexOf(a, 0) to check starts-with in hint addons

Issue #2109