Fix empty variable detection in compile_append_var()