Fix EZP-23208: async publishing JavaScript polling gives bad results