title: Receiving "...has already been registered..." from EventLog.CreateEventSource even though I'm checking !EventLog.SourceExists
body: <p>My following code fails with "...has already been registered as a source on the local computer" even though I'm doing checks first:</p>
  
  <pre><code>lock ( eventLock )
  {
      string eventLog = Constants.EventLogPL;
      string eventSrc = Constants.EventSrcPL;
  
      if (!EventLog.Exists(eventLog))
      {
          if (!EventLog.SourceExists(eventSrc))
          {
              try
              {
                  EventLog.CreateEventSource(eventSrc, eventLog);
              }
              catch (Exception e)
              {
                  System.Diagnostics.Debug.WriteLine(e.Message);
              }
          }
      }
  }
  </code></pre>
  
  <p>I'd have thought my call to <code>!EventLog.SourceExists</code> would have been enough to prevent my error!
  I'm on 2010 .NET 4 and Windows 7 64 compiling to any CPU.</p>
  
  <p><strong>Edit:</strong> Updated code to get Constant's to locals to check they don't change, and use locking to make sure only one thread can test and create. Code still fails with the same error.</p>