[WIP] Adding support for merging on virtual frames

[This should be merged after the pull request with "infrastructure improvements" - comments on how this work to follow!]