blockhl.c, chqflag.c: fix generic_paletteram regression (nw)