Fixes issue #703.

The function declaration fd may be null on an indirect call.