Fix: calling as_json on a destroyed Mongoid 3.1 object with a HABTM relationship raises undefined method map for nil:NilClass.