callout: Fix recently introduced bug causing crashes

Fixes #1961