When a build that uses groovy-postbuild is started by build-flow the GroovyPostbuildRecorder is unable to update the build.xml while serializing com.cloudbees.plugins.flow.FlowCause.
These two must be used together - a job started by build flow without groovy does not have issues, or the same project started directly by a user.
I was able to resolve this by adding the three following entries to whitelisted-classes.txt:
I do not know what changes may be needed in either of the plugins to correctly resolve this - I'll leave it up to others to create those tickets.
Attached is the console output for four builds - one for each marshal failure, and the final success run at the end.