FORGE-1823 - Exclude optional dependencies that are included transitively.