getting the href is broken in IE7

getting the href is broken in IE7

$('<a href="#test" />').attr('href')

In FF, Chrome, Safari, IE8, this returns "#test"

In IE7 it returns the full URL with "#test" tagged on.

Is this expected/fixable?  Or is it a bug?