Made sure to_X_sstring() doesn't accidentally append str to its end when location = previous_location.