Merge "Fixes NPE from resolveRotation()" into tm-dev