Fix issue where search result was reset after sending a message (#1489350)