NaN is interesting because it creates another corner case where the == will be surprising if it's implemented has a component wise comparison, value record Box(double value); var box = new Box(Double.NaN); box == box // false so both semantics are not reflective.
Go re-read the definition of substitutibility, you'll see that indeed it is reflexive. (Even though `==` on double is not.) So you'll need to find another counterexample :)