Currently SortedRecords::find_apex_rtype() searches for any RRSET of the right type and owner.
There are two minor issues with this:
- The owner to search for can be any owner, not just the apex, which makes the fn name a bit misleading.
- If the RRSET type wanted doesn't exist the search will iterate over every record in the collection even though the matching owner may already have been found and checked (as the records are sorted).
For small zones this won't matter but it might for larger zones, especially if searching multiple times for different record types, e.g. DNSKEY, CDNSKEY and CDS.