closes #290: merge in parts of @RubioV/RMMapBoxSource-offline-crash-fix