Phase-reference monitoring in coherent-state discrimination assisted by a photon-number resolving detector