Ensure reference to map is local to control, fixes #1