Fixed #2398: Fixed a bug of renderer for renderTexture

Fixed a bug of renderer that its cache functions doesn't work when a renderTexture has an other renderTexture