Limits of validity of photon-in-cell simulation techniques