Ensure that join/leave handlers are called on proper context.