build: apply_profile: first include (if available) private definitions, than public/community