Worked around an apparent GCC bug in moments.