Fix determination of Metadata version in packaging (#8933).

Original patch by Filip Gruszczyński.
3 files changed