> (Your bad example is a bad bad example because the . is already enclosed.)
That depends whether diagonal movement is possible. Except for the recording of the actual game, the graphics in the post tend to imply that it is.
If it isn't, then the filling-in-the-square example:
XX
+X
meets the definition "touches two separated sections of wall that are part of the same component" (northwest and southeast; northeast isn't a neighbor of the new wall), but fails to create an enclosed region. And by this definition of connectivity, it is never possible for two neighbors of any space not to be "separated".
There was something else in the article that bothered me:
>> If every cell has a path to the boundary of the grid, then there are no enclosed spaces. Any enemy could move along the boundary to eventually get into any cell.
This seems to say that this wall addition is fine, failing to separate the grid into two parts:
..X..
..X..
..+..
..X..
..X..