More work to avoid working with vertices outside XS