Basemap package

This PR had to fix the same bug that was fixed in old hashstack (https://github.com/hashdist/hashstack/issues/110), but reappeared in new hashstack.

After some struggle (see the commits/comments below) I think I have figured a clean solution to the problem.
I consider this PR finished, but please review it thoroughly and let me know if this is the correct fix.

/cc @ahmadia, @dagss