'Unresolved supertypes' when compiling tests

I have class ValuedAsset.kt, which implements interface WithCopyValues. This class is extended by hundreds of Java and Kotlin classes, which all compile. However, when unit tests are compiled in a different invocation of the compiler (using Ant javac withKotlin), I get the unresolved superclass error:

error: supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:

class ValuedAsset, unresolved supertypes: WithCopyValues

Same issue did not happen when exactly same ValuedAsset class was written in Java. I verified that the class path is correct and that WithCopyValues.class is compiled (disassembled it in IntelliJ).

Kotlin version is 1.3.72
Java version is 1.8.0_202