I don't know if this is what's causing the issues, but I noticed that `this.dependencies` is actually defined as an object and not an array, see: https://github.com/SunboX/pdf.js/blob/9cddfef8fa87482272afb28157de31a4506f0a4b/src/core/evaluator.js#L1496.
So this line doesn't actually do what you intend it to do!

Just a friendly reminder: When making changes to code that effects rendering of PDFs, make sure that your patch passed the tests locally, see: https://github.com/mozilla/pdf.js/wiki/Contributing#-4-run-lint-and-testing.