@jerven I had not answered your question yet, and no patch needed, but just to answer it:
1. the original (theseus) code is here: https://github.com/wikipathways/GPML2RDF/tree/main which is used for https://sparql.wikipathways.org/
2. the new libGPML-based code is here: https://github.com/egonw/org.pathvisio.io.rdf which is used for https://plantmetwiki.bioinformatics.nl/