DynamicParam update

Assignment of session state now comes straight from the mocked function's script block, instead of only when the script block is part of a module.