Two stages template compiling.

Tag line number for debugging.