John, I suspect you've got the optos in the wrong order.

If you look at the traces on the top side, I'd say the top opto is P10, and it's track runs down the outside of the limit switch connector to the E-Stop connector. The tracks of the other 4 optos seem to match up nicely with the Limit Switch connector, and I wouldn't expect the bottom opto track to run the way it does if it was going to the E-stop connector.