Completely agree. That's exactly what I use in every of my own plugins and themes that shouldn't get loaded outside the context.