The mechanisms generating community phylogenetic patterns change with spatial scale