I can concur that moving the line to where Matthias put it does fix the issues on my machines with downloading and building, it also takes care of the error -> mount: /git/ipfire-2.x/build_x86_64/proc: mount point does not exist from what I am seeing.
# If unshare is asked to terminate, terminate all child processes "--kill-child" )
mount --bind ${BUILD_DIR}/proc ${BUILD_DIR}/proc
fi
while [ $# -gt 0 ]; do
one thing I don't see is the mount when i check the output of mount or the output of findmnt -o+PROPAGATION