Issue #2968452 by amateescu, timmillwood, jeqq, alexpott, Fabianx: Add a way to execute a function in the context of a specific workspace (cherry picked from commit bc3348bb)