Don't crash when network allocation is missing. See #1234.