I think the following is a bug, but I'm not really sure. I've checked the documentation for differences between old-style command substitution ( `...` ) and new-style ( $(...) ), and couldn't see anything that related to this problem.
At my place of work, I use some loops with variables to generate a lot of aliases and functions. Our employees use these to modify variables, including their PATH, to change their environment for testing different versions of our Cobol products. When I made a recent change, some of the PATH modifications stopped working. (Before diving in to investigate the issue, I changed the aliases to functions to get things working again.)
I have created a much simpler set of test aliases and functions to illustrate the issue and I have to admit it's a bit obscure.
If I "source" the attached file (i.e. "