diff --git a/build/build.fs b/build/build.fs
index fad604c..08e6554 100644
--- a/build/build.fs
+++ b/build/build.fs
@@ -186,8 +186,8 @@ module Test =
          "safe", !! "node_modules/@types/yargs/index.d.ts", [];
          "minimal", !! "node_modules/@types/vscode/index.d.ts", ["--readable-names"];
 
-         // #404: complex package which could break topological sorting
-         "minimal", !! "node_modules/playwright-core/index.d.ts", [];
+         // #404: package with mutually recursive files (requires --merge)
+         "minimal", !! "node_modules/playwright-core/index.d.ts" ++ "node_modules/playwright-core/types/*.d.ts", ["--merge"];
       ]
 
       for preset, package, additionalOptions in packages do
@@ -196,6 +196,15 @@ module Test =
             $"--preset {preset}"; $"-o {outputDir}"] @ additionalOptions)
           package
 
+      // patches for playwright-core
+      Shell.replaceInFiles [
+        "Readable.t", "Readable.t<'t>"
+        "URL.t", "NodeJs.Url.t"
+      ] [
+        outputDir </> "playwright_core.resi"
+        outputDir </> "playwright_core.res"
+      ]
+
     let build () =
       Shell.mkdir srcGeneratedDir
       for file in outputDir |> Shell.copyRecursiveTo true srcGeneratedDir do
diff --git a/dist/res/src/ts2ocaml.res b/dist/res/src/ts2ocaml.res
index 9721b3c..c05624e 100644
--- a/dist/res/src/ts2ocaml.res
+++ b/dist/res/src/ts2ocaml.res
@@ -25,7 +25,9 @@ type true_ = bool
 type false_ = bool
 type intrinsic = private string
 type object = Type.Classify.object
+module Object = { type t = object }
 type function = Type.Classify.function
+module Function = { type t = function }
 
 module Union = {
   type container<+'cases>
diff --git a/test/res/src/placeholder/SVGElement.res b/test/res/src/placeholder/SVGElement.res
new file mode 100644
index 0000000..d19ccd7
--- /dev/null
+++ b/test/res/src/placeholder/SVGElement.res
@@ -0,0 +1,3 @@
+type _svgElement<'a>
+type svgElement_like<'a> = Dom.element_like<_svgElement<'a>>
+type t = svgElement_like<Dom._baseClass>
\ No newline at end of file