Normally, your LilyPond snippets just get a running number. If you re-order your scores, each one gets re-rendered.
You can avoid that if you name your LilyPond snippets: just add <tt>[name=myfunnyname]</tt> to {{cmd|startlilypond</cmd>}}.
If you have just one LilyPond part per component (e.g. songs in a songbook), you could use <tt>[name=\currentcomponent]</tt>.