The following change causes the problem since it assumes, that the parameter exists at the time the update script is executed (upgrade of acs-templating from 5.5.1d1 to 5.5.1d2)
http://fisheye.openacs.org/changelog/OpenACS?cs=oacs-5-5:victorg:20090724141231
The parameter was introduced in 5.2. Going straight from 5.1.* to 5.5.d2+ seems to cause the trouble, since apparently, the parameter would be created by the upgrade logic at some time after the callback.
2 ways to install:
a) upgrade first to some earlier version and then to 5.5.1
b) change acs-templating/tcl/apm-callback-procs.tcl to check, whether the parameter exists (easiest to check if $plugins after the parameter get is non-empty).
(b) should be done anyhow, but it would not help for people using the tar file.
Hope this helps
-gustaf neumann