Don't ignore subtrees of type applications

Added testcase + fix.
Merge branch 'master' into traversing-for-loops