Fix a crash for ref page#anchor.

- Remove an improperly shadowed variable.
- Fixes #741.