Add support for recursive includes

This adds support (with tests) for recursive includes. See the recursive test cases to see how this works.