Would it be possible to make this check inside the code of the interface and return a reference to the Gecode space directly?