gallivm: fix a crash by making sure we set the has_mask flag correctly