Fix clang static initialization order issue; fixes bug 512.