Also fix a couple of buggy asserts. Bug: 5416594 Change-Id: I0e7e2548886af5fc0b8c20f70a3040d2c5bc68ea