The problem is that the traced model will treat non-tensor inputs as constants. This is not really changeable.
So you would want to mix script and trace as discussed in the other thread.
Best regards
Thomas