Relax reference checks to allow reuse ObjectEntries names in scope for newerly
created construct-name.
Fortran has restriction that for do-construct-name corresponding end-do shall
be at end-do-stmt specifying the same do-construct-name, and gfortran/nvfortran
allows to reuse names from objects.
"details" is being passed by value; perhaps a const reference would be better.