The second person pronoun, ni, blocks the long distance reading of ziji, so it cannot refer to Zhangsan. This is because of differing POV features of Zhangsan and ni.