Fix database leakage in map_spec.rb. Closes #323