If you are dealing with a behavior in your dog that seems like it cannot be explained or changed you might be dealing with a decision your dog has made.
For example: I had the wonderful opportunity to work with a Boston Terrier, who had a sensitivity to his back and hind quarters. If he was being touched in a certain way it would trigger a bite response. The owners had him since puppyhood and the behavior started a few years ago. The biting was directed at anyone who was going to pet the dog by approaching over the head towards the back. The dog would bite regardless of who was petting.
While it is not really relevant to have the information to why this behavior started I found out that it started after having a severe skin problem a few years back that got the dog associating pain with being touched in this way.