Merge "Remove unecessary flag checks for Transaction#setFlags" into main