Bugfix - add functor parameter to environment when necessary
Bugfix - add functor parameter to environment when necessary

Signed-off-by: Jon Ludlam <44f878afe53efc66b76772bd845eb65944ed8232@recoil.org>

ocaml-doc/odoc,ocaml-doc/odoc