Scottish government changes to Scottish planning policy quashed