Remove isLocal and use location()

Fix requested by @davidlange6 at #3059.