compositor: Use the logging context when iterating over scopes