I have found and fixed the cause of this. [ . . . ]
Ferret has forever tried to be case-insensitive, letting users ignore the upper- or lower-case spelling of variables. Here there was a tangle in some of our logic for this because when the names are in quotes they should be handled in a case-sensitive way. (If your file had happened to use an upper-case Z, this would all work!)