stat_accum_input: Handle both new and legacy namespaces

+ Add tests for new namespaces