Accept scope parameter for partial template expansion

Change-Id: I779587005bf8b39db249af955f26d8c72afdcedf