Fixed incorrect assert (#11720)

Change-Id: I723230420c893ed9d5f498309b0763afaf55d6a5