David,
You discovered a bug! It looks like currently, the block
isn’t working. We’re looking at the issue. In the meantime you might want to see if there is some other way to do what you are trying to do. I’ll think about it, as well.
Just FYI, you might think about using stored variables instead of Local Storage and cloud variables instead of Realtime DB. That would greatly simplify your app, though it wouldn’t solve the particular issue that you are having.
Sorry for the trouble your having.
-Mark