For libraries in the master/lib directory, the master script (more precisely, functions.sh) sorts all entries to ensure that co.cask.cdap jars come before any org.apache jars in the classpath. This allows us to override classes from Apache jars in CDAP jars (for example, tephra or twill).
For the hbase-compat lib dir, the script does not do that and simply puts, for example
to the beginning of the classpath. This causes trouble when we actually attempt to override a class from a Tephra compat module.
The compat library dir should be sorted the same way as the master/lib dir.