This way we could generate the capabilities in a way that works with every version of make. Changes to list_capabilities are intended to exactly replicate the old behavior. (cherry picked from commit e92da079ca12e776991bd36524430bd67c1cb72a)