$attributes['id'] is used for making $renderedAttributes :)
Check code above my changes :)