Fixes T3976. Long ago, some applications used "#comment-5" instead of "#5" for transaction/comment anchors. Now everything (I think?) uses "#5"; this is the style used by ApplicationTransactions.
This might break some very old, explcit T123#comment-5 links, or off-site links to the comment-N anchors, but all that stuff generally got renumbered when we migrated anyway and getting you to the right object is like 95% of the job.