compile: Fix detecting external sources