Fix regression where duplicate function names were not an error.