Automatically remove read access when consent is withdrawn.

Fixed incorrect handling of zero as a metadata value.