Fixes U4-2505 umbraco 6.1.2 throws System.NullReferenceException on the first publish after site compilation