It is better to just move the files options after mymachines and not replace it the complet line. The Ubuntu nsswitch is not set up for modern software.
hosts: mymachines files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] myhostname dns