I realized that when you're doing a loop inside a linked custom transformer, you don't have the possibility to redirect the loop to a private input. If you do that, you'll have a "LOOPBACK_INPUT_TAG" error.
So you have to publish the input (even if you don't want it to be visible on the custom transformer).