Fix issues causing php and page redirection errors on 404s

Fix php errors/warnings when current post/page information is included in a theme's header area, prior to the WPeC query swap.
Fix php errors/warnings when using ThemeFoundry's "Make" theme

Conflicts:
	wpsc-components/theme-engine-v1/helpers/template.php

Should resolve #1557 
This will break stuff, as the function still references `$wp_query`