Fixed several more places where varid is double-mapped.