Changes to fix image sharing
Merge pull request #196 from unwin/2014.08-cp

Changes to fix image sharing cherry picked from devel