Strict mode incorrectly reset after function

Fix for  #133