don't crash while scanning versions (fixes #663)