Fix targets classes getting removed from the complete binary