Adding up to version 40 capacities for all encoding types and ecls.
ECL layout up to 40 for L and M
ECL layout up to 40 for M and Q. Should work for all versions now.
Make module path generation tail recursive to fix stack overflow.