Fix non-synthetic companion objects for case classes