Compositional Security for Reentrant Applications (Technical Report)