Fix regressed test case Dynamo.Tests.CustomNodes.ReduceAndRecursion

This pull request is to fix regressed test case caused by my pull request #2659.

In that pull request adding custom node definition to ``LoadedCustomNodes`` is moved to after compilation, which cause a recursive custom node recursively loads itself and stack overflow exception is thrown out. Restore this behavior. 

Have run custom node related test cases to ensure no regression. 

@Benglin , thanks for review in advance.