More tests for the "Ambiguous use of ... resolved ..." warning S_scan_ident().

In particular, test that the special case for reporting $# as @ works.
Add comments describing the operation of S_scan_ident().