Complex evolutionary footprints revealed in an analysis of reused protein segments of diverse lengths