I have offered a bounty that expires tomorrow to my question Highlighting line ranges in a lstlisting: partial solution, but expansion issues, as it did not get very much attention. The bounty didn't help much, though; so I did investigate further and came up with a workaround I have posted as as an answer. So far this is the only answer.
I know that it is considered as perfectly okay to accept one owns answer (especially if it is the only answer). However, should/can I also award the bounty to myself?