I would applied dicopunt codes not to imapct "free shipping" conditions unless the customers final purchase amount is over the threshold, not their pre-discount total.