The comment is correct, but the code doesn't match.  It should write the block when it's not the case that learning is disabled and the w is all zeros.