Check if ag is aliased before unaliasing