Persistent nodes will not store items unless the max_items is set. Otherwise, it will check for size greater than -1 (unset max number) and never persist.
This is the fix for and OF-17.
I seriously underestimated the complexity of the code, when I agreed to do the code review. I've asked Gato for help. He agreed to review the patch if he can find the time.
This patch seems to be the exact same diff that was attached to OF-17. If that is the case then it is fine by me.
It is, as mentioned in my first comment.
Checks properly when max_items is not set