Avoid locking in queries after map closed.  Fixed bug in close.