Refactor composited backing-sharing code