Fix: no-unused-expressions better directive detection (fixes #1195)

Fixes #1195. Depends on #1193.