Tiny optimization of getId()

Or it's funny?