P1787 has an excellent description for what are the same entity.
Two declarations of entities declare the same entity if, considering declarations of unn