#1645 Added nil check to settings when adding flags to build files