rose metadata: fail-if/warn-if: work for duplicate sections

The current logic for checking `fail-if/warn-if` metadata does not know about
duplicate sections - this adds the correct behaviour.

@arjclark, please review.