Fix spatial indexing by using cached maps when appropriate; some other fixes