[BZ-1026311] fix incremental compilation when only java classes are changed