Modified call_on_dispersy to only register if not on dispersy thread