Update expression codegen to resolve templates relative to component declaration.