I earlier fixed a bogus "lsearch" result check without realizing that the "lsearch" had another bug, searching a comma-separated string rather than a list. Sigh. This code never "worked" it just appeared to work since the old portal code didn't give errors if you tried to modify parameters to a non-existent portlet.