IoBuffer.compact() fix and dedicated test