Search function not finding some styles

I've noticed the search function gets stuck sometimes and doesn't highlight all real matches:

Expected results: https://i.imgur.com/OoIX7Mf.png

Unexpected: https://i.imgur.com/iJvtMSc.png

In the unexpected case I would expect it to highlight also the attributes within the style block.

My version is 5.3.1