AC_AttControl: Combine repeated code