Fixed bug in CascadeNetworkExpansionReactionStrategy.

It incorrectly determined the size of the output layer,
which caused some issues when new weights are added.