Applying workaround for composer/composer#2218
Merge pull request #1 from Ocramius/feature/remote-object-cleanup

[WIP] Minor cleanups for the remote object proxy