I think
$sth = $dbh->prepare("SELECT document FROM table WHERE tag=? AND security_level=?");
$sth->execute(foo(), $user_level);
breaks as well, if foo() unexpectedly returns a list.