diff --git a/src/vteseq.cc b/src/vteseq.cc
index 7b5b49b0..80da7b4c 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -491,12 +491,16 @@ VteTerminalPrivate::seq_set_title_internal(GValueArray *params,
 			}
 
 			/* Emit the signal */
-                        if (change_window_title) {
+                        if (change_window_title &&
+                            (m_window_title_changed != NULL ||
+                             g_strcmp0(m_window_title, validated) != 0)) {
                                 g_free(m_window_title_changed);
                                 m_window_title_changed = g_strdup(validated);
 			}
 
-                        if (change_icon_title) {
+                        if (change_icon_title &&
+                            (m_icon_title_changed != NULL ||
+                             g_strcmp0(m_icon_title, validated) != 0)) {
                                 g_free(m_icon_title_changed);
                                 m_icon_title_changed = g_strdup(validated);
 			}
