Unify context handling of terms and keyword aliases