Question on history-graph not being consistent

Today I noticed something strange, an inconsistent state in my history graph for a given sensor. See as follows:

Some contact debouncing happened:
image

When opening the sensor, you get the following history:
image

This looks correct. However, when I look at a history graph card I see the sensor as follows:

image
For some reason the history graph is showing the door state as open, while the log and the sensor’s own history is showing it as closed, and I’m positive it is, in fact, closed.

I would expect both graphs to show exactly the same output. Anyone else has seen this behavior before?