Fix some locking order issues in app_queue. This was