add test for name scopes with semantic templates

R=arv
BUG=

Review URL: https://codereview.appspot.com/49380043