References #2563: Fixed topology filter to compute neighbourhoods the same way as 3.0.X

(cherry picked from commit f7184524f08a7f35ac6ae674f78a897b87504b65)