Fixed logic for putting rel=externals