Fix handling of --build-id