DUNE/Entities: fixed bit masking in BasicEntity.

Thanks to Ricardo Martins for spotting the bug.