Findlib sub-packages installed in the same directory as their parent
(like logs.lwt alongside logs) used to cause duplicate module
definitions in root.ml-gen (see #6148). Verify the fix deduplicates
entry modules.

Create a dummy library to depend on. The configuration is loosely
based on the logs package, which triggers the issue in real life.

  $ mkdir -p findlib-packages/logs
  $ cat >findlib-packages/logs/META <<EOF
  > description = "Logging infrastructure for OCaml"
  > version = "0.7.0"
  > requires = ""
  > archive(byte) = "logs.cma"
  > archive(native) = "logs.cmxa"
  > plugin(byte) = "logs.cma"
  > plugin(native) = "logs.cmxs"
  > package "lwt" (
  >   description = "Lwt support for Logs"
  >   version = "0.7.0"
  >   requires = "logs"
  >   archive(byte) = "logs_lwt.cma"
  >   archive(native) = "logs_lwt.cmxa"
  >   plugin(byte) = "logs_lwt.cma"
  >   plugin(native) = "logs_lwt.cmxs"
  > )
  > EOF

  $ touch findlib-packages/logs/logs.ml
  $ touch findlib-packages/logs/logs.mli
  $ ocamlc -c findlib-packages/logs/logs.mli -o findlib-packages/logs/logs.cmi
  $ ocamlc -c -I findlib-packages/logs findlib-packages/logs/logs.ml -o findlib-packages/logs/logs.cmo
  $ ocamlc -a findlib-packages/logs/logs.cmo -o findlib-packages/logs/logs.cma

  $ touch findlib-packages/logs/logs_lwt.ml
  $ touch findlib-packages/logs/logs_lwt.mli
  $ ocamlc -c findlib-packages/logs/logs_lwt.mli -o findlib-packages/logs/logs_lwt.cmi
  $ ocamlc -c -I findlib-packages/logs findlib-packages/logs/logs_lwt.ml -o findlib-packages/logs/logs_lwt.cmo
  $ ocamlc -a findlib-packages/logs/logs_lwt.cmo -o findlib-packages/logs/logs_lwt.cma

  $ export OCAMLPATH="./findlib-packages"

Setup the dune project.

  $ make_dune_project 3.4
  $ cat >dune <<EOF
  > (library
  >  (name root_module)
  >  (root_module root)
  >  (libraries logs.lwt))
  > EOF
  $ cat >root_module.ml <<EOF
  > module Logs = Root.Logs
  > EOF

Build should succeed now that duplicate entries are deduplicated.

  $ dune build
  $ cat _build/default/root.ml-gen
  module Logs = Logs
  module Logs_lwt = Logs_lwt
