Fix a bug in the federation API which could cause occasional "Failed to get PDU" errors.