Bug in function buildSearchQueryForFieldTypes() in CRMEntity.php
This function is used by the PBXManager migration routine and probably elsewhere too.
What it fails to do is to remove Converted Leads from the result set. When a Lead is converted it is not deleted, but it is not accessible so an extra WHERE clause should be included in this function to exclude converted Leads.