Opening and closing the settings panel should subscribe and unsubscribe one resize handler. After several mounts, every resize triggers the layout callback multiple times even though cleanup ran.
Fix subscribeToResize so that once a subscription's cleanup has run, its callback no longer fires.