Annoying compile issue in 4.17 preview 3

I’ve re-applied the fix in CL 3677373. It’s very unfortunate that we hit the same issue again, and that we didn’t learn our lesson and arrange test coverage around it the first time. I’ve raised it as an issue, and we’ll add test cases around it in the future.