Ported 'ReplaceWithFirstOrDefaultIssue' and 'ReplaceWithLastOrDefaultIssue'.