Some further tidies in wake of latest location leak

A few things following on from #229 , mainly in `LocationRegistry` API.  @neykov can you cast your eye over this please?
Should copy the map before mutating. Could be immutable, in any case the caller doesn't expect the flags to change.