The clue was to pay attention to which way the lines are marching. When you select the one in your file above they’re actually moving in 2 different directions and you can track down where your bad corners are by looking for where the direction change occurs.
I tried to join them but it just refused. I tried to auto close and again it refused. It was just easier to break it clean and redo each one at a time making sure at each step the lines all rotated in the right direction together.