Merge change 27364 into eclair

* changes:
  Improve logging code to dump more detaild rs object info.  Fix bug with predefined elements not being recreated for contexts after one was destroyed. Add stricter type enforcement.