Add some missing functions to CompositeLayer

Adapted from the MLP code.