Function calls aren't allowed in the conditions for INSERTION-BREAK
or REPLACEMENT-BREAK rules.
So you're doing line-breaking on the #MAIN-OUTPUT, call a function,
and inside that function you do an OUTPUT to the #MAIN-OUTPUT stream.
Where does that text go in relation to the text you're currently