fixed location checking in test matrix builder