The invite button added to the guild window is a bit of a hack, I'm actually surprised it works. What its doing is grabbing the entire text string of the person's name and class to use with the invite command. Usually this works since the command seams to ignore the extra text but apparently it doesn't always work
I haven't yet found a way to grab just the member name without the rest of the text.