You're probably right, Billi.
I went for the option of moving the name/id attribute because that way the HTML code remains valid, whereas putting the A tag outside the H1 tag isn't. Not something that will matter if you're just creating a MOBI file, but invalid code could cause problems if you later decide to use the same source to create an EPUB file with the intention of publishing it.
Heh... I'm a bit obsessive when it comes to writing valid (X)HTML code.
If it's only for personal use, definitely go with whatever works and is easiest to do.