Fix type checking errors against Twisted trunk.