Fixed bug in tuple-matrix to generic6dReference conversion

Fixed a bug in last commit. Fork du to bad usage of "commit --amend."