Password protected Macro length limited

Windows 7 64bit, LibreOffice 4.4.3.2
I prepared a complex macro made of about 50 subs with about 5300 lines of code. I would like to password protect it but when I try to save the document (Calc) I receive an error indication related to the fact that the library seems to be too large to be stored in a binary format. So it is impossible to protect it without splitting it in smaller modules. This is a problem because the subs are linked by some global variables.
I found this document
BasicImageSizeIncreaseWarning.odt
where it is explained that the problem is related to the old 16bit bound limit (65535 characters). My macro contains about 200000 characters.
From that documet and also from here Increase code size that basic can handle
I think to understand that this issue was solved years ago. But the problem is still present. What did I not understand?

One of the comments in the linked bug report documents that the issue was not fixed for password protection, and the old format continues to apply in that situation.

Consider converting the globals into return values for functions, and call the functions from other modules using the getScriptProvider method (noted here). An example:

REM -- Module 1--

Sub Main
Dim a(0),b(0),c(0) As Variant
scpr = ThisComponent.getScriptProvider

scriptLoc = "Standard.Module2"
funcName = "DemoGlobalSim"
lang = "Basic"
locName = "document"

scmod = scpr.getScript("vnd.sun.star.script:" & scriptLoc & "." & funcName & _
      "?language=" & lang & "&location=" &  locName)

globalVal = scmod.invoke(a,b,c)
MsgBox globalVal
end Sub

REM -- End Module 1 --

REM -- Module 2 --

Function DemoGlobalSim
    DemoGlobalSim = "Hello Global Value"
End Function

REM -- End Module 2 --

(if this answers your question, please accept the answer by clicking the check (image description) to the left)