Properly detect reused boolean values in beam_bool

The following code could crash the compiler:

```erlang
f(X = true) when X or true or X -> ok.
```

@UlfNorell