One of the things I find myself doing regularly when using a stencil is to enclose it in a selection (thank you, Someonesane) to prevent the paint strokes extending outside the boundaries of the stencil.

This is such a regular requirement I wonder if I'm missing a trick and a simple way of doing this was built into the stencil function?