Fixing swap between buffers of different types

This is a prototype fix. This will be handled slightly differently
when buffer/container will be refurbished.