[OE-3419] Fixed add-all and remove-all links for optional elements