Using strm2xxx to read multiple def creates the correct reference to "sub", but despite asking for --lefdef-macro-resolution-mode 2 where no cell should be created for the MACRO, klayout thinks a cell with the name sub already exists and wrongly adds $1 to sub when reading the sub.def. Thus there are two top-level (top and sub$1) instead of one where top is referencing sub and top has an unresolved reference to sub.
strm2oas --lefdef-lefs sub.lef --lefdef-no-implicit-lef --lefdef-macro-resolution-mode 2 top.def,sub.def k.oas
test_hier_defin.tar.gz