AUI-1646 Detach events from layout when change it