Fix incoming messages not being removed for a client if the topic being published to does not have any subscribers. Closes #1322. Thanks to Yannic Schröder.