Multiblock problems for almost periodic matrix functions of several variables