Fix Form::checkbox() with relationships.

Fixes #2290.