Serena said:
The behavior the dog is displaying sounds like a dominance issue to me, the barking upon being "caught in the act" is the dogs way of saying "This is mine!"
One was a female laso apso mix, spayed. I got advice from a trainer and 2 vets for her becuase she even hiked her leg which weirded me out because I'd never heard anything like that at the time. One vet wanted to do x-rays and the whole nine yards. Talked about the genitc issue of having both male and female parts (she didn't) It turned out to be on very dominent little dog...
The other was a male poodle, also fixed...
He stopped right after he attempted to 'hump' my leg. I abruptly knocked him over onto his back, exposing his belly, and 'growled.' I usually don't use this type of correction, but he needed to know that the behaivior was NOT acceptable! (that was the last time I ever saw him 'hump' anything again. And I'm not really suggesting anything like this to anyone, just wanted to share a crazy story! )
I've personally never heard/witnessed about a situation where it wasn't a dominance issue. Its probably more a common behaivior than everyone thinks, just something no one wants to talk about!