Fixed crash on .length() of a chain with no functions