Read only plug promotion fixes

This fixes a couple of bugs which would allow attempts to promote plugs which were marked as ReadOnly, and another which would prevent making a plug read only following promotion.