Fix problem where source file was being parsed more than once and if using an input stream, we would get a read error