Detect duplicate sections

With this commit all 63 out of 63 tests pass.