Replacing a trivial select by compact