Take the opportunity to refactor a bit the way the global platform or context is accessed Fixes: #5871
4..log