I tried this: $url->route('discussion', ['id' => $subject->discussion_id], ['id' => $subject->number]);
this: $url->route('discussion', ['id' => $subject->discussion_id], ['near' => $subject->number]);
and this: $url->route('discussion', ['id' => $subject->discussion_id, 'near' => $subject->number]);
Weirdly, all of them have the exact same result. At first I thought this might have something to do with cache, but when the english pack was tested, it worked fine.
Perhaps you can submit a pull request fixing this issue?