[PLAT-5306] Fix bug in equals