Revert "Fix bug when inserting the output of a custom function for the pre/postamble."