Fixed bug: Has spent amount discount rule option could lead to a stackoverflow