graphically, walls only connect to the open end of bastions
functionally, walls connect to every part of bastions
so if you place walls next to the closed end of a bastion you will see a gap but troops will not be able to pass through.
this is either a bug in graphics or a bug in function...