fix build
Add tests for Term.replaceAt/Term.subtermAt