This is just a rebranding of fabric/fabric#1812 since it turned out to be entirely Invoke's fault. See fabric/fabric#1812 (comment) for a brief summary of the actual problem (and the top of ticket for initial reproduction case - note that it only happens in bash for reasons yet unexplained...)
Currently working on some tests to try and prove the bug, then code to fix ought to be relatively simple (already have it specced out).