Fixed HTML structure when :append and :help_inline, :error, etc. are used simultaneously

Help, error, success, etc. messages did not appear when `:append`, `:append_button` or `:prepend` were used at the same time as `:help_inline`, `:help_block`, `:error` and similar options.

I haven't exhaustively tested every combination.

I find my code a bit messy, but don't have the time/ideas to make it better right now. Feedback on possible improvements would be much appreciated.