As usual, JackieNmutts is right!
My dog USED TO do this, but doesn't now, it CAN be trained out of the dog, using the 'leave it" cue.
somewhere is a thread on how to teach "Leave it", if you do not know. If i can find it, i'll post it for you, it's not hard to teach.
Me, i think i taught that, starting in the house, by putting a not too exciting treat in front of him, "Leave it", and rewarding him if he did NOT eat it.
then i advanced along to more and more tempting treats.
then i did this outside. (For my dog, ALL tricks/cues are way harder for him to do outside).
then i began to say "Leave it" about poop. He got the idea pretty readily, he understood.
IT CAN BE DONE!! HANG IN THERE!!