fixes #3766 - change NAME_MAP to be a method