Fix incorrect redirect when selecting a payment method with ajax disabled and permalinks set to default. Closes #1290