Add a regression test and import bug fix from alf-core.