Better handling of complex {{#if}} targets

See #1812
Merge pull request #2011 from wagenet/if-improvements

Better handling of complex {{#if}} targets