Fix ast_add_extension2 updating ast_exten correctly in certain cases