Great, thanks so much for your help! That seems to have solved the issue.
I’ve opened a draft pull-request here. I couldn’t find anything specific in the wiki about how to format draft pull requests (some of the pieces, e.g., tests, aren’t there yet), so I just filled out the PR information informally for the time being while I get the code into shape. If there are guidelines I should follow more closely or missing info that you’d like to see at this point, just let me know and I can edit / delete as necessary.