Unit test for bug fix #46: tieIndices not working correctly for complex tensors.
Fixed complex case of tieIndices, fixes #46.