Allow adv. search over reference code, fixes #6695