Fix DateTime comparison with DateTime::Infinity object

Fixes #16406