memmap_close: Don't crash on null dereference
remove a dead store
Don't crash on out-of-bounds reads from invalid banks