However, when I click on it, the link takes me to fig-a instead of fig-b.
If I comment out the statement \setcounter{figure}{0},
then everything works just dandy. But I really want
my figures to be labelled starting at 1.1 for section 1,
starting at 2.1 for section 2, etc.
[...]