#5979: Set overflow only when needed