Revert "Fixed scanning bug identified in #1119"

This reverts commit 698a31c8997f97ceb0c96466a48a13a4a3748f7b.

Reverting to previous commit.