PUP-1244 narrowed down to possible logic error