Using type from packed tool

Our workflows use command line tools included raw from a static web site, using a namespace as in method (4) of bio-cwl-tools. Some of our tools define types, which we include in the usual way with SchemaDefRequirement. This works when the tool and the type definition are in separate files.

But when we pack the tools and their associated types into a single portable file, we can’t find a way to refer to the type in the packed file. Cwltool constructs a reference with the complete URI inserted in front of the hash.

Does anyone have a working example of using a type from a packed command line tool?

Here is the kind of error cwltool –validate returns:

checking field 'type'
  Field 'items' references unknown identifier
  'https://example.io/cwl-tools/tool/tool#types.yaml/input_type',
  tried
  file:///tmp/workflow/tools/gemenet-pw.cwl#https://example.io/cwl-tools/tool/tool#types.yaml/input_type

Here is how we normally refer to types defined in separate files:

requirements:
  SchemaDefRequirement:
    types:
      - $import: cwl-tools:tool/types.yaml

inputs:
  something:
    type: cwl-tools:tool/types.yaml#input_type[]

steps:
  tool:
    run: cwl-tools:tool/tool.cwl
    in:
      something: something

$namespaces:
  cwl-tools: https://example.io/cwl-tools/

We think that the type reference using the packed tool should be

inputs:
  something:
    type: cwl-tools:tool/tool.cwl#types.yaml/input_type[]

but in any case we don’t know how to include the type definition in SchemaDefRequirement

Thanks in advance for any advice or working examples