Fix dependency layering issues caused by r180112.

Patch by Tom Stellard. (Committed while he's afk per request)