So I did a quest, to keep the spoilers free, and ended up going back to Whiterun to talk to the person in order to complete said quest. As it was night time I figured I'd pick the lock and go into his house, because surely he'd be happy that I had completed the quest for him. This turned out to be false and I got 5 bounty for trespassing. Amazingly, 10 seconds after when I was outside and so was he, I talked to him and he is all OMAGOD THANKS DUDE HERE HAVE A SKILL POINT. Then, the guards start to attack me. I do not get a chance to yield (I had my weapon sheathed when they attacked) and they kill me. So I reload the auto save coming out of his house and immediately go to talk to a guard. Get the "Wait...I know you," part. I tell them that they're making a mistake, and that I am the Thane's man.
They say that they will look the other way this time, but to be more careful in future. Then, THEY UNSHEATH THEIR WEAPONS AND ATTACK ME AGAIN.
FOR 5 BOUNTY.
Surely this is a glitch?