Rework version stamp code to align with the production method

Change-Id: I2c08a2a19a11a1069952e9f3387e5e629f4c5bfa
Merge "Rework version stamp code to align with the production method"