#2521: Decoupled readonly state of ReferenceParameter from the referenced parameter and corrected cloning.