Ah, his current behaviour probably comes about from lack socialization with humans during the puppy period but still contact with other dogs. It is vital that pups have the human socialization period from about 7-14 weeks so that they learn how to bond with people. If they are left with their mother and siblings, they tend to not learn how to bond with humans and bond too closely to other dogs. From 0-7 weeks is when they learn how to be and bond with other dogs in the form of their mum and siblings.
How old was he when you acquired him? No doubt this is what happened to him being as you describe him as being almost feral when you got him.
Good luck ridding him of his clumps, lol.