Trailing whitespace in artist, albums, and track titles should always be ignored by Last.FM, both by the BBCode system and when looking up pages. There is no way two artists, for example, could legitimately be differentiated by whether one has a space after it or not. It's even less likely to cause name collisions than ignoring capitalization.
By ignoring it in BBCode, I mean that wrapping a string ending in a space/tab/newline/etc. in artist, album, or track BBCode tags should form a link with the same URL as wrapping the same string with the trailing space removed.