dune subst should not fail when adding the version field in opam files

  $ cat > dune-project << EOF
  > (lang dune 3.19)
  > (name test)
  > (version 0.1)
  > (generate_opam_files)
  > (package (name test) (allow_empty))
  > EOF

  $ dune build

  $ cat test.opam
  # This file is generated by dune, edit dune-project instead
  opam-version: "2.0"
  version: "0.1"
  depends: [
    "dune" {>= "3.19"}
    "odoc" {with-doc}
  ]
  build: [
    ["dune" "subst"] {dev}
    [
      "dune"
      "build"
      "-p"
      name
      "-j"
      jobs
      "@install"
      "@runtest" {with-test}
      "@doc" {with-doc}
    ]
  ]
  x-maintenance-intent: ["(latest)"]

  $ dune subst

  $ cat test.opam
  version: "0.1"
  # This file is generated by dune, edit dune-project instead
  opam-version: "2.0"
  version: "0.1"
  depends: [
    "dune" {>= "3.19"}
    "odoc" {with-doc}
  ]
  build: [
    ["dune" "subst"] {dev}
    [
      "dune"
      "build"
      "-p"
      name
      "-j"
      jobs
      "@install"
      "@runtest" {with-test}
      "@doc" {with-doc}
    ]
  ]
  x-maintenance-intent: ["(latest)"]
