Strict in_array for mixed id variable types

Setting the in_array check to strict, as this would return true
incorrectly when and if values are of mixed type.
Remove some spacial overkill
Merge pull request #1084 from petteyg/bakedbtabspace

Remove some spacial overkill
Add tests for #3545

Fix included in GH-1075

Closes #3545
Merge branch 'pr-1075'

Merge changes in pull request 1075.