I’ve got a fix in here:
https://github.com/discourse/discourse/commit/f1ac3cf88811151a4205a357a544d54ab9e2a85b