Sort lookup paths by prefix length
What does this MR do?
Ensures lookup paths are sorted by prefix length to avoid matching a group level domain before checking all other lookup paths.
Fixes #576 (closed)
Related to #571 (closed)
Edited by Jaime Martinez