Fixes #1292 in discourse/discourse