If you use multiple if statements, the merge will fail and replace the wrong @endif. The same problem was there before with the repeaters but that is fixed now.

There template:

@if.paymentDiscount
There should be a paymentDiscount
@endif
@if.discount
There should be a discount
@endif