This is indeed a bug and this block should be reworked; I'll push a new diff tomorrow-ish.