cleanup & bugfix for R environment
Fix for sert_environment tag in tool dependencies definitions.
Merged from next-stable