Issue #9061: Fix issue about compare logic