The issue was rather this: when trying to damf-publish the main file, the locally imported lemma was not being found to be registered (there was a failure to publish in the first place). This is because the current damf-publish tries to link to all the lemmas used in the proof of a theorem (in the file to publish) as dependencies. Later however, I think that we might only want to link to locally skipped (unproved) or damf-imported lemmas, and possibly leave the choice of linking locally proved lemmas as damf dependencies to the user?
Actually, on second thought, I think this one is also questionable. Let's discuss in the morning. I'm not entirely sure I understand the problem you're trying to solve.
The issue was rather this: when trying to damf-publish the main file, the locally imported lemma was not being found to be registered (there was a failure to publish in the first place). This is because the current damf-publish tries to link to all the lemmas used in the proof of a theorem (in the file to publish) as dependencies. Later however, I think that we might only want to link to locally skipped (unproved) or damf-imported lemmas, and possibly leave the choice of linking locally proved lemmas as damf dependencies to the user?