Correct handling of variablen-length sequences for attributes, plus uncomment a
bunch of tests that stress this area of the library.

Also clean up some compiler warnings in the dispatch code.