Index line-wise decorations by ids

@nathansobo good call on comparing by id.

Fixes #2848 
This is fixed