Hi Andrew,
It does work using standard ports. If you say it does not work correctly with non-standard ports I believe you and agree its a bug.
However, I don't have time to give this issue priority right now. I consider it a corner case.
But mojoportal is open source so if this issue is important to you, I encourage you to investigate a solution and submit it.
Best,
Joe