With R4, R9 and R13 replaced with a link it should work. As the schematic showed it, might have worked but the highest voltage you could get on U1 inputs would be half VCC (because of the voltage divider, example R4 and R1) less some extra voltage dropped by the transistor in the PC817. That might not be enough to ensure logic levels were satisfied. Personally, I would link out R4, R9 and R13 and also increase the value of R1, R2 and R10 to say 4.7K as there is no advantage in the extra current being drawn through them.
Brian.