Hello Lukas,
thanks for sharing your project. I have done basicly the same test at my side. Nevertheless I have tested with your project but also with same result: variable stays at 0.
If have encountered the following:
I update Multilink firmware with PEFirmwareConfig tool to usbmlfxufjtagens.1018 (should be latest version).
If I connect to freemaster and test the connection to the targed the firmware is automatically updated from version 10.18 to 10.36.

But at the end of the update process 10.18 is shown as the new version.

I could not find a difference in firmware images comming from P&E update tool and the ones provided with freemaster installation. Why is the update started? Could there be somthing wrong with the firmware update? Can you see the same at your side?
The connection test shows this result:

Is BDM version 0.0 correct?
Regards
Jörg