ari: Fix deadlock problem with functions that use autoservice.