parser: fixed #if's handling

Their state must be remembered throughout all file, not block