localize template safety
template scopes (foreach)