Attempt to fix close() race in TransferChannel (causes tests to hang on Travis)