Use Ident.same instead of List.mem for is_shadowed check
is_shadowed used List.mem which triggers compare_val (generic
structural comparison) on Ident.t values. Replace with List.exists
using Ident.same (stamp-based integer comparison), reducing per-
element comparison cost from O(tree_size) to O(1).
Indexed_container_intf read_impl: 2.48s -> 2.16s (-13%).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>