Thanks for reporting @jomaxro This was indeed a bug and I just submitted a PR to fix!
https://github.com/discourse/discourse/pull/3912/files