Invariant measures for Q-processes when Q is not regular