This can happen if there are multiple identical types present in the module. For example:
%1 = OpTypeArray %int %10
%4 = OpConstantComposite %1 ...
%2 = OpTypeArray %int %10
%3 = OpTypeStruct %1 %1
%5 = OpConstantComposite %3 %4 %4
In this example, there exists a constant for %3. However, if we try to call fuzzerutil::MaybeGetZeroConstant, it will check if there is a constant for %2 instead of %1. There is none. Thus, the function returns 0.