Modify searchToBoundary to work on the nested filter object.

Fixes #1254 Search by location polygon not working on development
Merge pull request #1266 from maurizi/fix/location-search

Modify searchToBoundary to work on the nested filter object.