Varieties with a reducible hyperplane section whose two components are hypersurfaces