Past lessons pay off for Ulster