pat: making sure that shared sources don't get compiled twice.