Dynamic Selector : Appear Message "variable is not defined in the current scope" even if it's defined

I’ve just faced the same issue. Turns out as soon as I give it the default value, the message disappeared. Looks like the one of the guys above ( sorry for not knowing how to mention) said correctly. The error message should relate to the default value not the scope.