Read only plug promotion fixes

This fixes a couple of bugs which would allow attempts to promote plugs which were marked as ReadOnly.