fixes legacy "aml-dist" environments and adds it to CI.

27 jobs for refactor-1 in 2 minutes and 31 seconds (queued for 1 second)