Add regression test for issue #509
Make sure to consider context for the SLL precedence filter (fixes #509)
Add a comment describing a possible future optimization to applyPrecedenceFilter
Merge pull request #510 from sharwell/fix-509

Fix 509