Thanks for your code and update.
I view deeper logic for it today, just like my previous mentioned, when you pass in multiply stop points, we will find their nearest routing feature, then if they are too closest so the nearest routing feature is the same one, only one of them will be left after routing.
I talked with our development team about it today, we think the logic here shouldn't been the best one. We cannot enhancement it immediately, but we will add it to our list and assign source for it future.
So the solution what you are doing should be the workaround.
Any question please feel free to let us know.