2518: Don't include closure dependencies if use_closure is False