Steps to recreate:
In a groovy script contained in the vars folder of a shared lib, call sh(returnStdout: true, "Someshellscript.sh")
If you read the returned string as a hexdump, you'll find all of the stderr and stdout of Someshellscript.sh contianed in the string