This is a fun one.
The renderer for theme_boost includes a function for render_pix_icon which calls export_for_template, and then modifies the content.
This is a big no-no as it leads to inconsistent render information.
You can see this already in the action menu as it is not possible to add an additional class to an icon in the action menu.
This should allow us to add the m-l-1 class to the icon instead of the link in an indented action menu, however it is silently dropped.
This is because render_pix_icon calls $icon->export_for_template() and then modifies the content - https://github.com/moodle/moodle/blob/master/theme/boost/classes/output/core_renderer.php#L487.
This modification only happens for an icon output directly. It does not get called when a template is included from another template. In that case the parent template should already include the context data for the icon.
Basically, we need to remove that modification, and ideally we need to prevent such modifications from happening in themes at all.