More cleanup of DA code

Made indexing slightly stricter, which uncovered a bug in one test