Fix a possible crash due to passing NULL to ast_variables_dup()