Let $G$ be a locally compact, second countable Hausdorff topological group, equipped with its Borel sigma algebra and a left Haar measure $\mu$. Let $A\subseteq G$ be a dense subgroup. If $u:G\to\mathbb R$ is measurable and
$$u(gx)=u(x)\quad\text{for $\mu$-almost every $x$, for each $g\in A$},$$
then there is $c\in\mathbb R$ with $u(x)=c$ for $\mu$-almost every $x$.