CherryPick PR2117 to avoid assert on invalid state

Bug: chromium:1336300
Change-Id: Iee9c4e2fc1a9b1979cd7cf3cee1e4d34f64abb77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/3721537
Reviewed-by: Jungshik Shin <jshin@chromium.org>
3 files changed