Fixed sourcesAreEqual for overlay case.