A user should still be able to use an anchor link if they are viewing the anchor's respective section.
For starters, this is especially useful if it's a very long section, and the user wants to quickly scroll to the top of it by clicking the anchor.
Secondly, it should just work regardless, because otherwise the user will be confused and think something is broken if it doesn't work in all cases.