Code commonly checks if the parent DIE is DW_TAG_compile_unit. But DW_TAG_partial_unit also acts as DW_TAG_compile_unit for DWZ as DWZ is using DW_TAG_imported_unit only at the top unit level.
All DWZ patches are also applied in: git clone -b dwz git://git.jankratochvil.net/lldb