build: apply_profile: respect 'distance'-setting