The predefined VERSION variable is exactly the same as that under the "Project Properties" at the beginning of the script at the end just before the apply install it has appended the 4th place to the VERSIon.
i.e.: At start 7.50.3212, after apply install 7.50.3212.0
so the 7.50.3212.0 value is being written to the registry instead of the 7.50.3212 value.
Yes, that is it exactly, just wasn't prepared for the difference, can't debug in the IDE parseing the variable on the last occurance of . in the version.