While compositing, RenderLayer doesn't move with time
You have to rerender each frame in order to update the comp. You can do this by pressing F12 to render the whole scene or clicking the render icon on the layer node to render just that layer.



It would be simple to add the possibility of rerendering when the frame is changed, but in reality most renders take several minutes (sometimes hours, or days) to render and thus accidentally changing the frame would clear the render and you would have to wait for it to finish again.

Of course this option could be disabled by default, but I don't see any serious use coming from this and thus it's not worth the effort to code.