So this bug was caused by an assert being hit in libutils It was in:
#3 0x00007ffff790410b in android::VectorImpl::itemLocation (this=0x7fffffffc990, index=0) at libutils/VectorImpl.cpp:319 (Which is a build from current git, 6.0.1+r55 Android builds have NDEBUG set system wide during the build, so this code wouldn't have really been built / tested much without that set. It works as the opposite of the flag DEBUG. Once that was set, the assert wasn't hit anymore and so the code continued to run like it normally would. This bug was hit in aapt as it links against libutils and went through a code path which the others may not have, or not in the same way. In the future, we should take care and add NDEBUG to all android projects, and also keep using gdb because once I got used to that it didn't take long to see what went wrong :)