[MNG-2145] Correcting several merge issues between profiles and main build, and also of duplicate plugin declarations within a single build section.