title: InvalidOperationException (collection is already set to an EntityCollection) after template modified that all properties are virtual
body: <p>Default tt for DbContext entities adds in entity's constuctor the initialization code for collection proeprties. Each collection is assigned empty HashSet<br/></p>
  
  <p>For scalar entity properties tt has this code:<br/></p>
  
  <pre><code>public string Property(EdmProperty edmProperty)
  {
      return string.Format(
          CultureInfo.InvariantCulture,
          "{0} {1} {2} {{ {3}get; {4}set; }}",
          Accessibility.ForProperty(edmProperty),
          _typeMapper.GetTypeName(edmProperty.TypeUsage),
          _code.Escape(edmProperty),
          _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
          _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
  }
  </code></pre>
  
  <p>if I change it to:</p>
  
  <pre><code>public string Property(EdmProperty edmProperty)
  {
      return string.Format(
          CultureInfo.InvariantCulture,
          "{0} {1} {2} {{ {3}get; {4}set; }}",
          AccessibilityAndVirtual(Accessibility.ForProperty(edmProperty)),
          _typeMapper.GetTypeName(edmProperty.TypeUsage),
          _code.Escape(edmProperty),
          _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
          _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
  }
  </code></pre>
  
  <p>Adding AccessibilityAndVirtual() EF starts throwing InvalidOperationException saying that collection is already set to an EntityCollection.<br/></p>
  
  <p>Why do this happen?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Removing virtual from the PK property removed the exception. </p>