fix allies with null faction (to be resolved later).
 fix backwards compatible code for at_permission.
Fix some crashes that happened while debugging an old data file.