I Have discovered a bug. When creating a public theme not all theme components are copied.
Follow the following steps to reproduce the error.
Step 1 - Create new application
Step 2 - View the template source
Step 3 - Create a Public Theme
Step 4 - Create a new application with this public theme
Step 5 - View the template source