Fix EZP-22366: Add missing cast on bitwise comparison