Fix gallery merging: support for None offsets