Fix forward-ported code from v1.4 to use namespaces.