Simplified infixWithLength() and fixed ContainerView case

This fix can be applied to develop only.