title: Glass Mapper: InferType is ignored when querying the SitecoreContext
body: <p>I have installed the package <code>Glass.Mapper.Sc.CastleWindsor</code> in version <code>3.1.2.11</code> on my Sitecore 7.1 solution and am trying to work with inferred types. I have the following classes:</p>
  
  <pre><code>[SitecoreType]
  public class ServiceConfiguration
  {
      [SitecoreField(FieldName = "Service Id")]
      public virtual string ServiceId { get; set; }
  }
  
  [SitecoreType(TemplateId = "{26512C19-8D30-4A1E-A2CD-3BA89AF70E71}")]
  public class JavascriptServiceConfiguration : ServiceConfiguration
  {
      [SitecoreField(FieldName = "Is Header Responsive")]
      public virtual bool IsHeaderResponsive { get; set; }
  }
  </code></pre>
  
  <p>And i have this item:</p>
  
  <p><img src="https://i.stack.imgur.com/FERbx.png" alt="enter image description here"></p>
  
  <p>In my code, I try to get this item from the current context mapped by glass with the following line of code:</p>
  
  <pre><code>var serviceConfig = (new SitecoreContext()).GetItem&lt;ServiceConfiguration&gt;("{5436EEC6-1A4D-455F-8EF7-975C51FAE649}", inferType: true);
  </code></pre>
  
  <p>According to the <a href="http://glass.lu/docs/tutorial/sitecore/tutorial17/tutorial17.html" rel="noreferrer">documentation on inferred types</a>, I would expect that <code>serviceConfig</code> would be of type <code>JavascriptServiceConfiguration</code>, but it is of type <code>ServiceConfiguration</code>. Am I missing something? I did not make some specific configuration to glass.</p>