Just as an example, the following command should yield nothing but it does:
find shared-resources -type f | while read f; do grep -rq "$(basename "$f")" modules/ shared-resources || echo "$f"; done