Fixed C extension sandbox behavior
bug #1256 Fixed C extension sandbox behavior (tucksaun)

This PR was squashed before being merged into the master branch (closes #1256).

Discussion
----------

Fixed C extension sandbox behavior

fixes #1254

Commits
-------

40bba0e Fixed C extension sandbox behavior