I'm going to be briefer than usual on this one since I think the issue is not all that obscure or difficult to reproduce. Basically, any invocation of the form:
$ teitoX --apphome=foo test.xml
leaves the profiledir to its default value. If you want to build a document against a fresh svn trunk rather than what teitoX uses by default, setting apphome to the root of the svn trunk won't be enough. You MUST also set profiledir and invoke teitoX as follows:
$ teitoX --apphome=foo --profiledir=foo/profiles test.xml
otherwise profiledir will point to the default value. That is, the profiledir must be manually specified to be the profile directory which belongs to whatever code base apphome was set to.
I often set profiledir without changing apphome but I cannot conceive why I'd ever want to set apphome and yet have profiledir remain to its default value.