Mass of trapped photons vs. Mass of potential energy
I've understood for a while that a black hole is made more massive simply by shining light on it; the energy of the photons "goes towards" (for lack of a more informed/accurate term) the mass of the black hole. Also, a couple weeks back, someone on the forums said that if one had a container lined with perfect mirrors, then photons trapped inside the container would effectively add mass to the object. If this is true, then it occurred to me that a system could conceivably change its mass by sequestering photons within itself.
Imagine the following system: two heavy masses, at rest relative to each other, are held apart by a scaffold of some kind. The scaffold has a track which will allow the masses to fall towards each other, driving an electricity generator as they go. The generator is hooked up to a lamp which shines into a really, really long perfect-mirror-container, with another perfect mirror ready to slide down in front of the lamp (to close the container). Let's say the total mass of all the components of the system is M.
When this contraption is triggered, the masses fall towards each other, the lamp shines, and the mirror snaps shut before the light returns from the far end of the container. We now have the same system, with none of its particles missing, except now we also have a perfect-mirror-container full of photons.
Is the total mass of the system still M? Or is it slightly more? If the mass is the same, then where did the mass of the trapped photons "live" before they were generated?
Thanks in advance for any input / explanation / humbling rebuke.