Fix bug in local_abs_merge optimization