Merge "removeAll unregisters callbacks in the wrong order, causing exception"