The symlink loop occurs when this line is executed:
ln -sf libcitadel libcitadel-7.83
cd libcitadel-7.83
if libcitadel-7.83 is already a symlink pointing to libcitadel - so the symlink get's made inside libcitadel. The -f option doesn't have the desired effect if the pre-existing symlink target is a directory.
Patch to follow.
It would help sending git-patches if drafts-mode patch could be enabled on uncensored; git-imap-send dumps the diff and message in my drafts folder ready for me to pick-up.