Thanks for your report. I have been looking at this exact issue recently.
I've gotten some of the tests to pass by fixing a lot of the more straightforward issues, but there are some problems that may require more invasive changes. As such, I want to work with upstream to figure out the best approach for those. I don't have a timeline for the fix yet, but it is being actively worked on.