Use stable sort to get consistent exception messages cross-platform. Closes #20.