restore old foreach on $availabeRelations #433

the foreach introduced had 3.3 array structure that differ from 3.2