build: improve dependency detection for composite pages