[Group] Match Xcode behavior while deciding wether to add the file reference attribute