This is fine as long as no reference is kept on the location String outside of the Loader.
If this is not sufficient we might want to use new String(location) as a key in the map.