title: Invalid index 13 for this SqlParameterCollection with Count=13
body: <p>This exact title can be found in google or here at stackflow.com many times but the reason I am getting this error is like none of them: I have no problem in the unit test code but the exact same code in the application causes this issue. I wish it was because of a mapping issue.</p>
  
  <p>Here is my mapping:</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="utf-8" ?&gt;
      &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="My.Domain" namespace="My.Domain"&gt;
        &lt;class name="My.Domain.ReportFormFlag, My.Domain" table="ReportFormFlag" schema="Core"&gt;
          &lt;id name="FlagID"&gt;
            &lt;column name="FlagID" sql-type="uniqueidentifier" not-null="true"/&gt;
            &lt;generator class="guid"/&gt;
          &lt;/id&gt;
          &lt;property name="ReportInstanceID" column="ReportInstanceID" type="int" not-null="true"/&gt;
          &lt;property name="FormID" column="FormID" type="int" not-null="true"/&gt;
          &lt;property name="SiteOrProjectID" column="SiteOrProjectID" type="int" not-null="true"/&gt;
          &lt;property name="IsFlagged" column="IsFlagged" type="int" not-null="true"/&gt;
          &lt;property name="FlagComment" column="FlagComment" type="string" not-null="false"/&gt;
        &lt;/class&gt;
      &lt;/hibernate-mapping&gt;
  
  and here is my class
  
  namespace My.Domain
  {
      [Serializable]
      public class ReportFormFlag
      {
          public virtual Guid FlagID { get; set; }    
          public virtual int ReportInstanceID { get; set; }
          public virtual int FormID { get; set; }
          public virtual int SiteOrProjectID { get; set; }
          public virtual int IsFlagged { get; set; }
          public virtual string FlagComment { get; set; }
      }
  }
  </code></pre>
  
  <p>The code I use to insert a new record:</p>
  
  <pre><code> var reportFormFlag = new ReportFormFlag
              {
                  ReportInstanceID = 3554,
                  FormID = 25,
                  SiteOrProjectID = 0,
                  FlagComment = "test",
                  IsFlagged = 1
              };
  _provider.Save(reportFormFlag);
  </code></pre>
  
  <p>In NUnit test it works as expected but in the application the save() caused the "Invalid index N for this SqlParameterCollection with Count=N" exception.</p>
  
  <p>I am using NH 3.0, C#3.5, SQL Server 2008 R2.</p>
  
  <p>Any insight is greatly appreciated!</p>