Optimizes maybe_declare for transient queues