Hacki said he would look into fixing this. However, people who want to make scripts that detect versions from before the fix will still need to check both variants.
My understanding is that the autobuild had a special hack to add the SVN rev to the build number. Later, we added the ability to have svn rev in it's own field, but no one checked how that interacted with the autobuild.
I would suggest
build = tonumber(string.match(bi.build_number,'-(%d+)$'))
Which will be independent of the string length or number of digits in the svn rev, and return nil if for strings that don't end in -svnrev