What You Are Seeing?
I'm updating the chocolatey-license package, just using Example 4. It uses the installed license file for computing the date / version of the package rather than the source package.
What is Expected?
The date /version is computed from the $licenseLocation file.
How Did You Get This To Happen? (Steps to Reproduce)
Run the code from that example without updating the installed license file.