DCTFeatures: Fix bug with square pattern