Even though some may consider it "inhumane", sometimes you have to take things a little farther. You have a terrier, and they are VERY territorial. One of my two dogs is a terrier mix. I had a similar problem. You can purchase a "bark free" collar which will give them a mild jolt when they bark, and you can adjust the intensity. Also, for my bigger dog, I had a problem with her eating her fecese. I used a training collar that has a tone and shock. I would give her a warning tone. If she persisted, she got a mild shock. I tried it on myself first. Not pleasant, but nothing that would cause any damage. It only took a couple of the warning beeps combined with the shock to get the message through. After that, all it took was the beep and she would sniff her droppings and walk away. Now she doesn't even go near it.

Sorry if this meathod offends anyone, but sometimes the "give them a talking to and time out" method doesn't work.
_________________________
If only closed minds came with closed mouths.