Non-ergodicity of phase functions in certain systems