Merge "Fix index out of bounds when removing deferred containers" into rvc-dev am: 8da7870ba5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12035041

Change-Id: Iec7c899785d40beb05b40efa0b36a2f82dd89c73