[z1894] Fix faction check for EventAI command ACTION_T_SET_FACTION to also check for faction template.

(cleaned version of 0b50742)

(based on commit [s1468] - 20a68ea)