Previously we would warn when the local and cache version of a variable exists, but this use case doesn't need a warning as it maintains backwards compatibility.
Add policy CMP0077 to change this behavior in a compatible way.