[backend] adapt publisher to better support top-level trees