Improve query performance for implementations check
`ExtendedQueries::findReferences` builds a query to get `implementations` which sometimes takes long to run. See if there are ways of improving the performance of it.
issue