The following works in 19.2.0:
root@127.0.0.1:50371/movr> create table target (a int, b int, unique index (a, b));
CREATE TABLE
Time: 4.44ms
root@127.0.0.1:50371/movr> create table source (a int, index (a));
CREATE TABLE
Time: 3.063ms
root@127.0.0.1:50371/movr> insert into target values (1, 1), (1, 2);
INSERT 2
Time: 3.067ms
root@127.0.0.1:50371/movr> insert into source values (1);
INSERT 1
Time: 3.196ms
root@127.0.0.1:50371/movr> alter table source add foreign key (a) references target (a);
ALTER TABLE
Time: 153.205ms
This is wrong because a unique index on (a, b) doesn't actually enforce uniqueness for (a).