v.25.4Bug Fix (user-visible misbehavior in an official stable release)

Fix undefined behaviour on NaN comparison

Fix undefined behaviour on NaN comparison in argMin/argMax. #77756 (Raúl Marín).