make automatic document reloading more independent of tab implementation (cf. issue 2766)