Allow records to define recursively
Fix composition orders.
Fix a test
Avoid infinite recursions
Add dump codes for debugging
Fix composition of substitution.