Rewrite $a ?: $b to empty($a) ? $b : $a if $a is a variable