Merge "Revert "Quick fix to correctly handle empty file/channel handles.""