Fixed an issue in the ChannelAtIndexHelper that was failing when a DynamicLayout was one of the parameters.
Added test cases for CompoundLayout.channelAtIndex() when masks are used.