isEmpty seems wrong. Won't an email account for abc@gmail.com be a match for addressMatchesList("gabble/jabber/gmail", "abc@gmail.com")?