Fix bead numbering.
Various test fixes.

- Actually fail the test if lengths don't match.
- Account for the extra bead at Rpb4_117.
- Handle multiple hierarchies with the same name.
- Clean up output.