Factor out default index finding.