Offset 5 just moves the room enough without creating the possibility of an overlap happening on wall objects that are not adjacent to the room; ie moves less than the wall object width.
I'll only be able to try this later, but for doors to appear inside the room then sometimes wall objects are not being destroyed first. Which is probably caused by asking too much of the engine in one tick/event when creating a lot of wall objects and then destroying some of them at the same time.
Try changing the events by moving the room overlap check and wall destroy events to be under a tickcount =1 condition. Then move the door create check events to be under a new tickcount =2 condition.
I think that'll work but I won't be able to check until later to be sure.