Database: Fixed warning in DiscoveredReflection

Sometimes 'Warning: uksort() expects parameter 1 to be array, null given' on line 174 was triggered instead of 'PDOException: No reference found for $table->related(...)'