Fixing index bounds exception when TaskViews are added while dismissing. am: ffaf07fed0
am: 0eb26d7e4b

Change-Id: Iffb6fc9ef928f0eb1b3b3bf99239cb6bee7997ab