I killed some Imperial Soldiers in the Reach far away from the city, then ported back to Markarth via fast travel. I have no bounty in the Reach, I checked, but all the guards and NPCs in the city either run or attack me on sight. Nobody ever confronted me about having a bounty even when I sheathed my weapon repeatedly.
I tried to run away to get them to stop, but that only ended with me standing a long ways outside the city with 20+ guards, thalmor, and the jarl, his housecarl, and his steward all attacking me. I used "setbountygold" (or whatever that command is) and it did nothing. I tried stealing cabbages, but I never got any bounty notifications.
What is going on and how can I stop the guards being hostile?