Aspects of residual stress measurements in TiN prepared by reactive sputtering