title: Incorrect cross-reference syntax gives confusing "undefined label" warning
body: <p>Revising the title since I figured out that the problem was totally different than what I thought it was. Should I delete this question or leave it out here in case someone else makes this same mistake?</p>
  
  <p>Original title was: Some Sphinx cross-references don't recognize section title?</p>
  
  <p>Original question: </p>
  
  <p>I'm seeing some really odd behavior - I have cross-references in my Sphinx markup according to <a href="http://sphinx-doc.org/markup/inline.html#ref-role" rel="nofollow">http://sphinx-doc.org/markup/inline.html#ref-role</a> </p>
  
  <p>but when I build the document (HTML or LaTEXPDF) I get these errors on some of them: </p>
  
  <blockquote>
    <p>WARNING: undefined label: _unhiding (if the link has no caption the label must precede a section header)</p>
  </blockquote>
  
  <p>Thing is, the working and nonworking ones look exactly the same to me.</p>
  
  <p>Working:</p>
  
  <pre><code>.. _conditions:
  
  Monitoring Conditions and Alerts
  ================================
  </code></pre>
  
  <p>Broken: </p>
  
  <pre><code>.. _performance:  
  
  Viewing System Performance
  ==========================
  </code></pre>
  
  <p>Also broken:</p>
  
  <pre><code>.. _unhiding:  
  
  Unhiding Conditions and Canceling Auto-Dismiss
  -----------------------------------------------
  </code></pre>
  
  <p>I even copied the working one and replaced the reference term, but that didn't help. </p>
  
  <p>I should be able to work around this by explicitly defining the captions, but this is mystifying.... </p>