PHP: Avoid duplicate rebuilds.