title: Why is there a difference between evaluating a defun during emacs startup vs. later?
body: <p>I have a function with the following structure (I can post the whole definition if it is important, but I think it would be mostly distracting so for now I skipped this): 
  </p>
  
  <pre><code>(defun my-func (...)
    (save-excursion
      (cl-block lp
        (let (...)
          (loop for ... in ... do
           ...
           (return-from lp ...))))))
  </code></pre>
  
  <p>And I also have </p>
  
  <pre><code>;; -*- lexical-binding: t -*-
  </code></pre>
  
  <p>It used to work fine, suddenly I started getting the following error from this function:</p>
  
  <pre><code>return-from: No catch for tag: --cl-block-lp--, ("\\(" . "\\)")
  </code></pre>
  
  <p>This error is obviously false, as the tag does exist. Moreover, when trying to step through the function, I discovered that if I eval the definition again (after emacs has loaded), I do not get this error.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Why do I get this error in the first place? </li>
  <li>What could cause this code to fail when it evals once while emacs is loading, and succeed when evaluated again?</li>
  </ol>
  
  <hr>
  
  <p>P.S.</p>
  
  <p>I'm not sure why I wrote it with a cl-block/return-from rather than throw/catch - possibly because I am using the loop construct. I changed it to throw/catch and it works now.</p>