EZP-21970: reset array before calling key()
EZP-21971: return first alias if using showAllTranslations
EZP-21964: complete test coverage