I tried to reproduce this bug, but had no success. It could be either because it is some detail I am missing or this was already fixed by this commit:
https://github.com/discourse/discourse/commit/820564826e99791b1dae361f3efb6106146d4bd0
When did you last update?