There is no bug here, the game is behaving as it should. And just siding with the imperials is not going to cause any problems. Even being an imperial and killing the housecarl is not going to cause everyone a problem.
It's a known bug, many people have reported not being able to purchase the Falkreath plot after doing the Dark Brotherhood quest to kill the housecarl. You will fall out of the Jarl's favor even if you killed the housecarl in secret. I WAS Thane of Falkreath, even had the blade to prove it but was unable to purchase the plot. I even committed a crime and saw that my Thanehood was gone.
Replacing the Jarl and the Steward will fix the problem. Otherwise PC players can change easily change the Jarl's favor through the console.
Edit: If you're talking about Markarth, it's a known bug also. If you decline purchasing the house when the dialogue pops up, the game will bug out and it will never be offered again. It even shows in my quest log that I still need to purchase a house. Also by replacing the Jarl and Steward, it can be corrected. Otherwise PC players can easily fix it through the console.