Of course they would flank!
Let's just make the hexes disappear. What do we have? Three people backed against a wall as far as they can! So the middle one has one to the left of him, and the other to the right of him, doesn't get much clearer than that: flanked!
To avoid this "problem", I use...