c/cruft: Rewrite find_cruft to use index

Signed-off-by: Niels Thykier <niels@thykier.net>