This one caught me out today;
The SPFieldCollection.AddFieldAsXml method has a strange quirk – the field is created using the DisplayName value as the fields internal name (InternalName), instead of using the Name/StaticName value.
See this post for further information and a workaround.
The powershell version of AddFieldAsXml run against SharePoint 2007 does not exhibit this bug.
An easier solution has been posted here:
http://isharepoint2010.blogspot.co.uk/2012/06/problem-with-setting-fields-internal.html