Hrm. It's possible that the "Typical Hash iRule" article originally had "crc32" instead of "md5", which should work fine. crc32 has bad properties for using it in Election Hash iRules, though. I'll poke deb to correct that article if she doesn't see this instead...
The Election Hash iRule you point out does take the IP into account, but it's a bit non-obvious. The $N variable contains the IP:port of each active member, and the MD5 is taken of "$N[HTTP::uri]", so it does take it into account. It is easy to miss the $N, though.