Add `static` declaration to `Loader::element`

Add `static` declaration to `Loader::element` and
`Loader::packageElement`

Issue with `$this` in themes and header_required etc fixed with commits
* 1a5ffce27ddb0c98d23ed3d5c605728299ef60d3
* 0a4318b4bb7f50aed5d7d651eded557412df1efd