You can keep patching the function, someone will likely find a way around it... or, if not, it'll be some time before we feel safe that no-one will.
It's not the same function we're actually implementing, though.
Successive approximation? At least this keeps what we're looking for without making having children be as bad as murder.
EDIT: Mestroyer was the first one to find a bug that breaks this idea. Only took a couple of hours, that's ethics for you. :)
In the last Stupid Questions Thread, solipsist asked
People raised valid points, such as ones about murder having generally bad effects on society, but most people probably have the intuition that murdering someone is bad even if the victim was a hermit whose death was never found out by anyone. It just occurred to me that the way to formalize this intuition would also solve more general problems with the way that the utility functions in utilitarianism (which I'll shorten to UFU from now on) behave.
Consider these commonly held intuitions: