Cwltool/provenance worfklow.cwl#main vs workflow.cwl

I think I ran into a small issue in cwltool.

cwltool --provenance /tmp/provenance workflow.cwl#main params.yml works fine, instead
cwltool --provenance /tmp/provenance app-package.cwl params.yml throws an exception:

ERROR I'm sorry, I couldn't load this CWL file.
The error was: 
Traceback (most recent call last):
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/main.py", line 1119, in main
    packed_workflow(runtimeContext.research_obj, print_pack(loadingContext, uri))
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/main.py", line 633, in print_pack
    packed = pack(loadingContext, uri)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/pack.py", line 181, in pack
    find_run(processobj, loadref, runs)
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/pack.py", line 37, in find_run
    find_run(s, loadref, runs)
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/pack.py", line 44, in find_run
    find_run(s, loadref, runs)
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/pack.py", line 37, in find_run
    find_run(s, loadref, runs)
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/pack.py", line 42, in find_run
    find_run(loadref(None, d["run"]), loadref, runs)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/pack.py", line 162, in loadref
    lr_loadingContext, lr_uri = resolve_and_validate_document(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fbrito/.local/share/hatch/env/virtual/calrissian/0yKKXZFZ/calrissian/lib/python3.12/site-packages/cwltool/load_tool.py", line 507, in resolve_and_validate_document
    document_loader.resolve_all(workflowobj, fileuri)
  File "schema_salad/ref_resolver.py", line 926, in resolve_all
  File "schema_salad/ref_resolver.py", line 804, in _normalize_fields
TypeError: 'NoneType' object is not subscriptable

Is this related to the fact that main should not be the default entry point?
If so, shouldn’t we gracefully trap the issue ?

cwltool==3.1.20240708091337