Fix regressions introduced by the following patch: Clear existing GSource timeouts before adding new ones