Better discount code presence checks when completing purchasees. #2617