(#19845) Allow a block to be supplied as a confine

Allows a confine to take only a block parameter like
confine { code... }