Sorry to get you all excited!
Okies, just re-read what was going on there and what I didn't spot was that you had a 'for' loop in an expression. Having any kind of conditional (for / in / while etc) in and expression doesn't work as far as I'm aware. (You can call a global procedure from an expression that does have a conditional... but that's not what you are after here)
To get round your problem here I'd personally set up the expression to output the result to a single custom attribute (be it an attribute on your control object or to some null object in the scene). You could then run a MEL procedure to connect that custom attribute to the attribute of however many objects you want affected (using your loop)
Hope that helps