Multi level referenced files' path mapping

Hello there!

What’s the best way to solve multi level (chained) path references’ path mapping?
Eg. We have a .ass file as input file for cloud rendering. The Deadline plugin’s code solves the path mapping for this file’s source path and also for it’s content, so any referenced path in the input file is mapped correctly.
However the referenced files also contain paths, and these paths are not mapped at all, causing errors.

What’s the proper solution for this?