Closes: #765.
Thanks to Arun Kirthi Cherian. Bug: https://github.com/eclipse/mosquitto/issues/656
Bug: https://github.com/eclipse/mosquitto/issues/17