fix constant result check in array slice assignment code