Correct deal with exclusion and extensions

Fixes #488

/cc @mikesherov