track bean definitions by both name and ID; change rules for generating ID