Better Subdomain matching - lower_bound + forward/back search