[BUG #7527] Small optimization. If the decorator already has a rule in the stylesheet there is no need to call this.resolve here.
[BUG #7527] Check if resolving the decorator was successful and throw an exception with a meaningful error message if not.
[BUG #7527] Minor formatting.