ugtrain: improve reverse stack offset adaption