That’s correct according to the lookup rules. [basic.lookup.unqual]/13 says:
A name used in the definition of a static data member of class X
(after the qualified-id of the static member) is looked up as if the
name was used in a member function of X. [ Note: [class.static.data]
further describes the restrictions on the use of names in the
definition of a static data member. — end note ]
Since the unqualified a
is looked up as if you are inside a member function, it must find the member A::a
first. The initialization order of A::a
and A::b
doesn’t affect the lookup, though it affects how well defined the result is.