Fix incorrect result of checkPaymentAmounts if at least one payment is invalid