Fixed contextual typing for tagged template expressions.

Fixes #1472.