Fixed partial body resolve when element to resolve is not inside body
Partial body resolve: correct handing of this qualifier
Partial body resolve: added a test to fail if smart-casts will become too clever