Improve and add tests to the AstNodeReflector class