Fixed issues with resolution of tuple references in modules.