Merged trunk changes r549-565 into the delphi2010-port branch.
Merged trunk changes r509-519 into the delphi2010-port branch.