fix nested codecs handling, add first decoding test