He said:"Jim is doing his homework when his father came in."改为间接引语

问题描述:

He said:"Jim is doing his homework when his father came in."改为间接引语

He said that Jim was doing his homework when his father had came in.
He,Jim,father三者的时态要统一,father的动作发生在he的动作之前,故要改成过去完成时.
这句话本来时态就不对,when的前后怎么可能一个现在时,一个过去时呢?