Improve tests to check if the input vector can be the same instance as the output vector