Use native inNamespace instead of getNamespace where possible
Change-Id: I35135e7ddfd8755833b806e9b95f12b1d8f04db5