Fixed bug in implementation of TensorRef element access.