[runtime] Fix an assert caused by a157ac79e8f404f0eb9b263f5de697f13528deec.