HP-filtered moments: Fix bug when unit root models provide NaN's or Inf's in g_omega

(cherry picked from commit b33da9a40d1effc708661c12bf3a3077878ad332)