Thank you for the great replies. Yes, Krafen, I recall this is what happened to me too.
I wanted to see this for myself again so I whipped out my hex editor and made a super char just to get to the point.
Strangely, when I have arrived, this did not happen again as none of the Goblins were inside the locked room.
However, I have tried something different. I have beaten up the guys there with my fist in the intention of making at least one of them flee. As one started to escape, I have chased them towards the locked room. And voila! Yes, he managed to barge into the room before I opened the door for him. Thus keeping my precious Rusted Key. I tried this because I have noticed this special "feature" of NPCs having a special power to open locked doors either when they are chasing you or running away from you.
Screenshot of that scene just for fun.
![Image](http://i273.photobucket.com/albums/jj240/vengerob/Fleeing_Goblin.png)