Refactor GetFullDomain to not require iterating the string list twice