I think it's much better to clearly state in suitable places that . or [] is the way to index modules.
If it were possible to use '.' on non-constant objects I would not mind this at all.
IE, make '.X' into an alias for '["X"]', and let the optimizer do the constant optimization as far as it's possible.