Thank you very much for looking at this!
Now, if I type $HOM I get candidate $HOME, then I have to M-Tab to insert the candidate and type "/" to continue find-file in the directory, and then everything works as expected. This makes it now definitely usable for me!
It might still be a bit confusing that in case of an environment variable which value is a directory, Enter does open dired instead of transversing into the directory with find-file (typing $HOM followed by Enter opens dired in home). But I don't know if changing this would be better or worse than the current behaviour after your fix - or possible at all.
May be possible. Is that what Ido does? I'll try in a couple of days, ping me here if I forget.
João