Fix environment for registered command executor closures