Merge "Decrement size of pending write queue by correct amount" am: 79fc8d0212 am: b492ac69b5

Change-Id: I4c49229efbcfeeaaa2e4e7299dbac230f2ae9caf