Initial scoped selector support.
Update branch against master with fixes.
Added failing test for scoped selector changing root.
Functionality to allow scoped selectors to change root.
Fixed for new API.