Fix PR1816. If a bitcast of a function only exists because of a