Fixed Map.getIndex(). This fixes bug #18.