Simplify namespace handling by using analyse_identifiers