backported IO trampolining fix