Index: inlines.js
===================================================================
--- inlines.js	(revision 12486)
+++ inlines.js	(working copy)
@@ -56,8 +56,8 @@
 				var template = $("#" + options.prefix + "-empty");
 				var row = template.clone(true).get(0);
 				$(row).removeClass(options.emptyCssClass).removeAttr("id").insertBefore($(template));
-				$(row).html($(row).html().replace(/__prefix__/g, nextIndex));
-				$(row).addClass(options.formCssClass).attr("id", options.prefix + nextIndex);
+				$(row).html($(row).html().replace(/__prefix__/g, totalForms.val()));
+				$(row).addClass(options.formCssClass).attr("id", options.prefix + totalForms.val());
 				if ($(row).is("TR")) {
 					// If the forms are laid out in table rows, insert
 					// the remove button into the last table cell:
