ikev2: fix wrong index computation