Support model-local namespaces.

Change-Id: I12cb7d342accc11989019a24c3669bdf8d5e2cca