tools/patcheck: fix misdetection with stuff like const_names