Add test for flags remaining set over `add`.

Currently this test fails.

Signed-off-by: Magnus Therning <magnus@therning.org>