get_hosts() was treating [] (meaning complete restriction, no hosts allowed) the same as None (meaning no restriction, all hosts allowed). Fixed logic.