Not sure if I follow you, didn't he spawn the Dark Grey Tiles which have the solid behaviour? why not keep using the same logic and close the walls of the room for the edges?
Even if you do a Tiled background the rooms on your picture still show that is open so it will be a bit confusing for the player if it shows that can pass but when you try is blocked like an invisible wall.
You have multiple ways to do this but I still dont see where your issue is, if you have a Tiled BG solid the same size as one of those tiles and then you extend it either (Verticaly for left & right) or (Orizontal for Top & Bottom) then you check the last tile of each side then place you solid wall one tile after.
For me, it sounds like the side walls have to be fully closed using the same dark great tiles that you spawn through the level.
Unless Im missing something.