rm: Don't allow invalid index