This is a new series of patches rebased on patches David had made to support variable arity in builtin functions. Since his patches are cleaner than mine (and they still apply), it's better this way. The patch also checks for wrong flags now.