Vout of differential amplifier as Vref of comparator
The simple answer is: don't use an op amp as a comparator. Especially, don't use an early op amp such as an LM358 as a comparator with a single 5 volt supply. Use a real comparator - if you like oldies, an LM311 will give you much better results. 

Your LM358 is not remotely able to drive a high level anywhere near 5 volts. 2 volts is more like it. I suspect this is what you're seeing in your "incremental" level shift.

If you do use an LM311, make sure to connect a pullup resistor from the output to +5.