Backing out commit #6507 - causes too many problems.