Mom hierarchy. correctly handle cases when mom hirarchy file already contains defined ports