Check error uniqueness after massaging it, fixes #977 (lib)