<references> handler should respect inTemplate pipeline option

Change-Id: Ibfc1ea97aef8681bfd3cf04dba0aa32824c076f0