Workaround for a long-standing Twisted bug

See https://twistedmatrix.com/trac/ticket/6014 for details