Compositional Security for Reentrant Applications