My calc macro needs to be reloaded each time the file is reopened - why and how to fix please

My calc macro needs to be reloaded each time my file is reopened - why?
I have a calc workbook that contains a Basic script and a java script. The Basic and java scripts are included in a module / library within the Calc file (not under “MyMacros” or “LibreOffice” macros). Each time I open the file I receive an error message indicating that “A BASIC runtime error has occurred of type: com.sun.star.script.provider.Script.Framework.ErrorException Message: Macro Library Library1 not found.” This is the location of the java script code. The cells containing macro function callouts are blank and I cannot get them to recalculate unless I retype them. Then they work.
Why isn’t the library found when the file opens? Thanks! MikeVV

@MikeVV, could you please try new 4.0 release and if it is still a problem, attach an example file to the bug fdo#61045 (or close it, if everything works fine).

This is a bug in application startup order. But doesn’t Tools → Cell content → Calculate again (F9) work without need to retype?

Hi @mahfiaz, could you please post the bug # here so we can resolve this question as “Moved to bugzilla”. Thanks!

I filed this bug as: fdo#61045