Ported 'ReplaceWithLastOrDefaultIssue'.