Move LocationFilter into core

Ref 82bbbfc9873d34b214626f58cbe2f3d280362647