Handle dynamic addition of attributes

Handles dynamic addition of attributes to `<link rel=stylesheet>`
elements.

Fixes #3361