Resolve conditionals for #extends.
Engine tests for #extends.
Merge pull request #507 from micahcraig/master

Resolve conditionals for #extends.