Change haveSingleSourceLanguage to use a simple loop

Using array_map retains the group names in array keys,
which is not useful here, so changing to a simple loop.

Change-Id: If73917b0a462a5d9c3437d4bf789579f93246013