Fibre products, non-positive curvature, and decision problems