Better handling of multiple declaration errors in the target name graph