Fixed upstream build retrieval to get the latest upstream build if there are multiple