don't translate items when monomorphizing foreign-ABI functions

Extend the changes from #16059 to the new generic foreign functions introduced by #15831.