This is inefficient because it constructs a copy of `y[2:end-1]`