The expression to strip "--with-libtool-sysroot=..." from configure_args actually stripped all the configure_args defined in the template. To avoid this unwanted side effect use --disable-option-checking.