Tests and bug fixes for LSET, GVAR, GSET, POP and CONST