The bug is probably not to do with the base URL like I thought, but probably related to topic URL resolution.
I’ve a fix here