Fix logic.

This must have gotten missed in the first pass a pkgdb2 porting.

Should fix #87.