Use copy of handlers set to prevent changed size during iteration
(grafted from d730063ec21b7293348334a422a7b1c45ee41607)

--HG--
branch : 2.8
extra : source : d730063ec21b7293348334a422a7b1c45ee41607