CONN-807: Fixed the build to remove all Direct related references in non-direct build

Fixed the build to remove all Direct related references in non-direct build.