core: avoid nested calls to transport_check_fds