The behavior of HADOOP_USER_CLASSPATH_FIRST works the opposite of what it should do. If it is not set, HADOOP_CLASSPATH is prepended. If set, it is appended.
You can easily try out by doing something like
(HADOOP_CLASSPATH should point to an existing directory)
I think the if clause in hadoop_add_to_classpath_userpath is reversed.
This issue seems specific to the trunk.