detectScrapBlock fix

Changed logic and function. Not entirely sure I am happy, but I believe it will work.
Needs comments, but then again, everything I do needs comments...